<div class="pretty-split-pane-frame">
  <div class="split-pane fixed-left">
    <div class="split-pane-component" id="left-component">
      <div class="pretty-split-pane-component-inner" id="leftbar">
      {{ partial("partials/left_bar") }}
      </div><!--#leftbar-->
    </div><!--#left-component-->
    <div class="split-pane-divider" id="my-divider"></div>
    <div class="split-pane-component" id="right-component">
      <div class="pretty-split-pane-component-inner">
        {{ partial("partials/crumb", ["data": crumbData]) }}
        <div class="pretty-split-pane-component-inner2">
        {% if config is not empty %}
          <div class="row" style="padding-bottom:20px;">
            <div class="col-md-2"><button type="button" class="btn btn-default" data-toggle="modal" data-target="#exampleModal">新建内容</button></div>
            <div class="col-md-2 col-md-offset-8 text-right"><a href="/readme.html#post" target="_blank">查看帮助</a></div>
          </div>
          <div class="panel panel-default">
            <div class="panel-heading">目录列表</div>
            <div class="panel-body">
              <p style="line-height:2em;"><span class="glyphicon glyphicon-hand-right" aria-hidden="true"></span> 系统预置的目录是禁止删除的。<code>asset</code> 是站点资源目录，<code>theme</code> 是主题包目录，<code>post</code> 是存储文章的目录，<code>page</code> 是存储单页的目录，<code>public</code> 是最终生成html的目录，也是被打包的目录，<code>zip</code> 是存储压缩包的目录。</p>
            </div>
            <table class="table table-hover table-striped">
              <thead>
                <tr>
                  <th width="2%">#</th>
                  <th>标题</th>
                  <th width="13%">作者</th>
                  <th width="13%">生成日期</th>
                  <th width="13%">操作</th>
                </tr>
              </thead>
              <tbody id="list">
                {% for k,v in config %}
                <tr>
                  <th style="padding-top:13px;"><input type="checkbox"></th>
                  <td><a href="/{{ siteid }}/post/edit?path={{ v['path'] }}">{{ v['title'] }}</a></td>
                  <td>-</td>
                  <td>-</td>
                  <td><a href="/{{ siteid }}/post/edit?path={{ v['path'] }}" class="btn btn-default">预览</a> <a class="delete-bt btn btn-default" href="javascript:;" data-siteid="{{ siteid }}" data-path="{{ v['path'] }}">删除</a></td>
                </tr>
                {% endfor %}
              </tbody>
            </table>
          </div>
          {% else %}
            <div class="well well-lg text-center">哇偶！空空如也，啥也没有。<a href="javascript:;" data-toggle="modal" data-target="#exampleModal">新建内容</a></div>
          {% endif %}
        </div><!--.pretty-split-pane-component-inner2-->
      </div><!--.pretty-split-pane-component-inner-->
    </div><!--#right-component-->
  </div><!--.split-pane-->
</div><!--.pretty-split-pane-frame-->

<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="exampleModalLabel">新建内容</h4>
      </div>
      <div class="modal-body">
        <form>
          <div class="form-group">
            <label for="recipient-name" class="control-label">标题</label>
            <input type="text" class="form-control" id="title">
          </div>
          <div class="form-group">
            <label class="control-label" for="path">文件名</label>
            <div class="input-group">
              <div class="input-group-addon">/post/</div>
              <input type="text" class="form-control" id="path" placeholder="文件路径不支持中文">
              <div class="input-group-addon">.md</div>
            </div>
          </div>
        </form>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-primary" id="create-bt" data-siteid="{{ siteid }}">提交</button>
      </div>
    </div>
  </div>
</div>
